<?php
class Post extends AppModel {
	var $name = 'Post';
	var $displayField = 'title';
	var $belongsTo = array(
		'User' => array(
			'className' => 'User',
			'foreignKey' => 'user_id',
		),
		'Category' => array(
			'className' => 'Category',
			'foreignKey' => 'category_id',
		),
		'Type' => array(
			'className' => 'Type',
			'foreignKey' => 'type_id',
		),
		'City' => array(
			'className' => 'City',
			'foreignKey' => 'city_id',
		)
	);
	var $hasMany = array(
		'Comment' => array(
			'className' => 'Comment',
			'foreignKey' => 'post_id',
			'dependent' => false,
		)
	);
}
?>